﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using BIZ;
using DAL;
using System.Linq.Expressions;
namespace SinhNhat.admin.slider
{
    public partial class CentralBarOrder : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
       
        [WebMethod]
        public static void Save(string[] result)
        {
            for (int i = 0; i < result.Length; i++)
            {
                WebUtils.db.CENTRALBARs.Single(P => P.IdCentralBar.ToString().Equals(result[i])).Position = i;
            }
            try
            {
                WebUtils.db.SubmitChanges();
            }
            catch (Exception)
            {
                throw new Exception("Cant Save! Please Try Again or Contact with Admin");
            }
        }

 


 

    }
}